#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<string.h>
int titleToNumber(char* columnTitle)
{
    int ret = 0;
    int len = strlen(columnTitle);
    int count = len - 1;
    for (int i = 0; i < len; i++)
    {
        int mid = columnTitle[i]-'A'+1;
        int q = count;
        while (q)
        {
            mid *= 26;
            q--;
        }
        ret += mid;
        count--;
    }
    return ret;
}

int main()
{
    char ch[] = "AB";
    int ret = titleToNumber(ch);
    return 0;
}